<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the FlutterSoundRecorder class from the flutter_sound_recorder library, for the Dart programming language.">
  <title>FlutterSoundRecorder class - flutter_sound_recorder library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">
  
</head>

<body data-base-href="../" data-using-base-href="false" class="light-theme">
<div id="overlay-under-drawer"></div>
<header id="title">
  <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">flutter_sound</a></li>
    <li><a href="../public_flutter_sound_recorder">public&#47;flutter_sound_recorder.dart</a></li>
    <li class="self-crumb">FlutterSoundRecorder class</li>
  </ol>
  <div class="self-name">FlutterSoundRecorder</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
  <div class="toggle" id="theme-button" title="Toggle brightness">
    <label for="theme">
      <input type="checkbox" id="theme" value="light-theme">
      <span id="dark-theme-button" class="material-symbols-outlined">
        dark_mode
      </span>
      <span id="light-theme-button" class="material-symbols-outlined">
        light_mode
      </span>
    </label>
  </div>
</header>
<main>
<div
    id="dartdoc-main-content"
    class="main-content"
    data-above-sidebar="public_flutter_sound_recorder&#47;public_flutter_sound_recorder-library-sidebar.html"
    data-below-sidebar="public_flutter_sound_recorder&#47;FlutterSoundRecorder-class-sidebar.html">
    <div>
<h1><span class="kind-class">FlutterSoundRecorder</span> class 
 
</h1></div>

    
<section class="desc markdown">
  <p>A Recorder is an object that can record to various destinations.</p>
<hr>
<p>The Recorder class can have multiple instances at the same time. Each instance is used to control its own destination.</p>
<p>The destinations possible can be:</p>
<ul>
<li>A file</li>
<li>A dart stream</li>
</ul>
<p>Using a recorder is very simple :</p>
<ol>
<li>
<p>Create a new <code>FlutterSoundRecorder</code></p>
</li>
<li>
<p>Open it with <a href="../public_flutter_sound_recorder/FlutterSoundRecorder/openRecorder.html">openRecorder()</a></p>
</li>
<li>
<p>Start your recording with <a href="../public_flutter_sound_recorder/FlutterSoundRecorder/startRecorder.html">startRecorder()</a>.</p>
</li>
<li>
<p>Use the various verbs (optional):</p>
<ul>
<li><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/pauseRecorder.html">pauseRecorder()</a></li>
<li><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/resumeRecorder.html">resumeRecorder()</a></li>
<li>...</li>
</ul>
</li>
<li>
<p>Stop your recorder : <a href="../public_flutter_sound_recorder/FlutterSoundRecorder/stopRecorder.html">stopRecorder()</a></p>
</li>
<li>
<p>Release your recorder when you have finished with it : <a href="../public_flutter_sound_recorder/FlutterSoundRecorder/closeRecorder.html">closeRecorder()</a>.
This verb will call <a href="../public_flutter_sound_recorder/FlutterSoundRecorder/stopRecorder.html">stopRecorder()</a> if necessary.</p>
</li>
</ol>
<p><img src="/images/RecorderStates.png" alt="Recorder States">
<em>Recorder States</em></p>
<p>If you are new to Flutter Sound, you may have a look to this <a href="/tau/guides/guides_getting-started.html">little guide</a></p>
<hr>
</section>



    
  <section class="summary offset-anchor" id="constructors">
    <h2>Constructors</h2>
    <dl class="constructor-summary-list">
        <dt id="FlutterSoundRecorder" class="callable">
          <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/FlutterSoundRecorder.html">FlutterSoundRecorder</a></span><span class="signature">({<span class="parameter" id="-param-logLevel"><span class="type-annotation"><a href="https://pub.dev/documentation/logger/2.5.0/logger/Level.html">Level</a></span> <span class="parameter-name">logLevel</span> = <span class="default-value">Level.debug</span></span>})</span>
        </dt>
        <dd>
          Instanciate a new Flutter Sound Recorder.
        </dd>
    </dl>
  </section>
    
  <section
      class="summary offset-anchor"
      id="instance-properties">
    <h2>Properties</h2>
    <dl class="properties">
        <dt id="hashCode" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
  

</dt>
<dd class="inherited">
  The hash code for this object.
  <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>

</dd>

        <dt id="isPaused" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/isPaused.html">isPaused</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  

</dt>
<dd>
  True if <code>recorderState.isPaused</code>
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="isRecording" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/isRecording.html">isRecording</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  

</dt>
<dd>
  True if <code>recorderState.isRecording</code>
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="isStopped" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/isStopped.html">isStopped</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  

</dt>
<dd>
  True if <code>recorderState.isStopped</code>
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="logger" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/logger.html">logger</a></span>
  <span class="signature">&#8594; <a href="https://pub.dev/documentation/logger/2.5.0/logger/Logger-class.html">Logger</a></span>
  

</dt>
<dd>
  The getter of the FlutterSoundRecorder Logger
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="onProgress" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/onProgress.html">onProgress</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Stream-class.html">Stream</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../public_flutter_sound_recorder/RecordingDisposition-class.html">RecordingDisposition</a></span>&gt;</span>?</span>
  

</dt>
<dd>
  A stream on which FlutterSound will post the recorder progression.
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="recorderState" class="property">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/recorderState.html">recorderState</a></span>
  <span class="signature">&#8594; <a href="https://pub.dev/documentation/flutter_sound_platform_interface/9.28.0/flutter_sound_recorder_platform_interface/RecorderState.html">RecorderState</a></span>
  

</dt>
<dd>
  The current state of the Recorder
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="runtimeType" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span>
  

</dt>
<dd class="inherited">
  A representation of the runtime type of the object.
  <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>

</dd>

    </dl>
  </section>

    
  <section
      class="summary offset-anchor"
      id="instance-methods">
    <h2>Methods</h2>
    <dl class="callables">
        <dt id="closeRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/closeRecorder.html">closeRecorder</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Close a Recorder
  

</dd>

        <dt id="deleteRecord" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/deleteRecord.html">deleteRecord</a></span><span class="signature">(<wbr>{<span class="parameter" id="deleteRecord-param-fileName"><span>required</span> <span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">fileName</span></span>})
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a>?</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Delete a temporary file
  

</dd>

        <dt id="getRecordURL" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/getRecordURL.html">getRecordURL</a></span><span class="signature">(<wbr>{<span class="parameter" id="getRecordURL-param-path"><span>required</span> <span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">path</span></span>})
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a>?</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Get the URI of a recorded file.
  

</dd>

        <dt id="getSubscriptionDuration" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/getSubscriptionDuration.html">getSubscriptionDuration</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Duration-class.html">Duration</a></span>
  </span>
  

</dt>
<dd>
  Returns the current Subscription Duration
  

</dd>

        <dt id="isEncoderSupported" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/isEncoderSupported.html">isEncoderSupported</a></span><span class="signature">(<wbr><span class="parameter" id="isEncoderSupported-param-codec"><span class="type-annotation"><a href="https://pub.dev/documentation/flutter_sound_platform_interface/9.28.0/flutter_sound_platform_interface/Codec.html">Codec</a></span> <span class="parameter-name">codec</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Returns true if the specified encoder is supported by flutter_sound on this platform.
  

</dd>

        <dt id="noSuchMethod" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
    <span class="returntype parameter">&#8594; dynamic</span>
  </span>
  

</dt>
<dd class="inherited">
  Invoked when a nonexistent method or property is accessed.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

        <dt id="openRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/openRecorder.html">openRecorder</a></span><span class="signature">(<wbr>{<span class="parameter" id="openRecorder-param-isBGService"><span class="type-annotation">dynamic</span> <span class="parameter-name">isBGService</span> = <span class="default-value">false</span></span>})
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder-class.html">FlutterSoundRecorder</a>?</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Open a Recorder
  

</dd>

        <dt id="pauseRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/pauseRecorder.html">pauseRecorder</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Pause the recorder
  

</dd>

        <dt id="resumeRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/resumeRecorder.html">resumeRecorder</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Resume a paused Recorder
  

</dd>

        <dt id="setLogLevel" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/setLogLevel.html">setLogLevel</a></span><span class="signature">(<wbr><span class="parameter" id="setLogLevel-param-aLevel"><span class="type-annotation"><a href="https://pub.dev/documentation/logger/2.5.0/logger/Level.html">Level</a></span> <span class="parameter-name">aLevel</span></span>)
    <span class="returntype parameter">&#8594; void</span>
  </span>
  

</dt>
<dd>
  Used if the App wants to dynamically change the Log Level.
  

</dd>

        <dt id="setSubscriptionDuration" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/setSubscriptionDuration.html">setSubscriptionDuration</a></span><span class="signature">(<wbr><span class="parameter" id="setSubscriptionDuration-param-duration"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Duration-class.html">Duration</a></span> <span class="parameter-name">duration</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Sets the frequency at which duration updates are sent to
duration listeners.
  

</dd>

        <dt id="startRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/startRecorder.html">startRecorder</a></span><span class="signature">(<wbr>{<span class="parameter" id="startRecorder-param-codec"><span class="type-annotation"><a href="https://pub.dev/documentation/flutter_sound_platform_interface/9.28.0/flutter_sound_platform_interface/Codec.html">Codec</a></span> <span class="parameter-name">codec</span> = <span class="default-value">Codec.defaultCodec</span>, </span><span class="parameter" id="startRecorder-param-toFile"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a>?</span> <span class="parameter-name">toFile</span>, </span><span class="parameter" id="startRecorder-param-toStreamFloat32"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-async/StreamSink-class.html">StreamSink</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-typed_data/Float32List-class.html">Float32List</a></span>&gt;</span></span>&gt;</span>?</span> <span class="parameter-name">toStreamFloat32</span>, </span><span class="parameter" id="startRecorder-param-toStreamInt16"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-async/StreamSink-class.html">StreamSink</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-typed_data/Int16List-class.html">Int16List</a></span>&gt;</span></span>&gt;</span>?</span> <span class="parameter-name">toStreamInt16</span>, </span><span class="parameter" id="startRecorder-param-toStream"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-async/StreamSink-class.html">StreamSink</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-typed_data/Uint8List-class.html">Uint8List</a></span>&gt;</span>?</span> <span class="parameter-name">toStream</span>, </span><span class="parameter" id="startRecorder-param-sampleRate"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a>?</span> <span class="parameter-name">sampleRate</span>, </span><span class="parameter" id="startRecorder-param-numChannels"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">numChannels</span> = <span class="default-value">1</span>, </span><span class="parameter" id="startRecorder-param-bitRate"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">bitRate</span> = <span class="default-value">16000</span>, </span><span class="parameter" id="startRecorder-param-bufferSize"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">bufferSize</span> = <span class="default-value">8192</span>, </span><span class="parameter" id="startRecorder-param-enableVoiceProcessing"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">enableVoiceProcessing</span> = <span class="default-value">false</span>, </span><span class="parameter" id="startRecorder-param-audioSource"><span class="type-annotation"><a href="https://pub.dev/documentation/flutter_sound_platform_interface/9.28.0/flutter_sound_platform_interface/AudioSource.html">AudioSource</a></span> <span class="parameter-name">audioSource</span> = <span class="default-value">AudioSource.defaultSource</span></span>})
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  <code>startRecorder()</code> starts recording a recorder.
  

</dd>

        <dt id="stopRecorder" class="callable">
  <span class="name"><a href="../public_flutter_sound_recorder/FlutterSoundRecorder/stopRecorder.html">stopRecorder</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a>?</span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Stop a recorder.
  

</dd>

        <dt id="toString" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
  </span>
  

</dt>
<dd class="inherited">
  A string representation of this object.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

    </dl>
  </section>
    
  <section
      class="summary offset-anchor inherited"
      id="operators">
    <h2>Operators</h2>
    <dl class="callables">
        <dt id="operator ==" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  </span>
  

</dt>
<dd class="inherited">
  The equality operator.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

    </dl>
  </section>
    
    
    

  </div> <!-- /.main-content -->
  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. -->
<header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>
<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
    <li><a href="../index.html">flutter_sound</a></li>
    <li><a href="../public_flutter_sound_recorder">flutter_sound_recorder</a></li>
    <li class="self-crumb">FlutterSoundRecorder class</li>
</ol>

    <h5>flutter_sound_recorder library</h5>
    <div id="dartdoc-sidebar-left-content"></div>
  </div>
  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->
</main>
<footer>
  <span class="no-break">
    flutter_sound
      9.28.0
  </span>
  
</footer>


<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/docs.dart.js"></script>

</body>
</html>

